package com.neusoft.di.controller;

import com.neusoft.di.entity.Person;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/mrc")
public class MappingRequestsController {
    @GetMapping("/{id}")
    public Person getPerson(@PathVariable Integer id) {
        // ...
        return new Person(id, "neusoft");
    }

    @PostMapping("new")
    @ResponseStatus(HttpStatus.CREATED)
    public void add(@RequestBody Person person) {
        System.out.println(person);
        // ...
    }


}
